package pers.cl.dubbo.consumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import pers.cl.dubbo.consumer.service.HelloService;
import pers.cl.dubbo.mvc.annotation.Controller;
import pers.cl.dubbo.mvc.annotation.RequestMapping;

/**
 * @author chenlei
 * @date 2020/1/9
 * @description
 **/
@Controller
public class HelloController {
    @Autowired
    private HelloService helloService;

    @RequestMapping("/hello")
    public String hello(String msg){
        return helloService.sayHello(msg);
    }

    @RequestMapping("/async")
    public String async( String msg){
        return helloService.receiveAsync(msg);
    }
}
